<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对比temolate与render的区别</title>
</head>
<body>
<div id="app">
    <p :level="title">{{content}}</p>
</div>
<script src="../vue.js"></script>
<script>
    var com ={
        return:function (createElement,context) {
           return createElement('h'+this.level,this.$slots.default)
        }
    };
    new Vue({
        el:'#app',
        data(){
            return{
                title:3,
                content: '设备对文本'
            }
        },
        components:{
            com,
        }
    })
</script>
</body>
</html>